﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/default.master" AutoEventWireup="true" CodeFile="CommentManager.aspx.cs" Inherits="Administrator_CommentManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
Quản lý bình luận
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1>
        Danh sách Comment</h1>
    <table style="width:100%;">
            <tr>
                <td colspan="2">
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" Width="100%" AllowPaging="True" AutoGenerateColumns="False"
                    BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px"
                    CellPadding="4" CellSpacing="2" DataSourceID="ObjectDataSource1" ForeColor="Black"
                    EnableViewState="False" 
                    EnableModelValidation="True" onrowcommand="GridView1_RowCommand" >
                    <RowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="Comment_ID" HeaderText="Comment_ID" 
                            SortExpression="Comment_ID" />
                        <asp:BoundField DataField="Member_ID" HeaderText="Member_ID" 
                            SortExpression="Member_ID" />
                        <asp:BoundField DataField="Contents" HeaderText="Contents" 
                            SortExpression="Contents" />
                        <asp:BoundField DataField="Comment_Time" HeaderText="Comment_Time" 
                            SortExpression="Comment_Time" />
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:Button ID="btnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                                    Text="Delete" OnClientClick="return confirm('Are you sure?');" CommandArgument='<%# Eval("Comment_ID") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" />
                    <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td align="right">
                    <asp:Button ID="btnBack" runat="server" Text="Back to News" 
                        onclick="btnBack_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        SelectMethod="GetAll" TypeName="BusinessLayer.Comment">
                        <SelectParameters>
                            <asp:QueryStringParameter DefaultValue="" Name="Id" QueryStringField="Id" 
                                Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
            </tr>
        </table>
</asp:Content>

